package org.gd.hellojaxb.example.interfaces;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "user")
public class XmlUser implements User {
    @XmlElement(name = tagNameName)
    private String name = "";
    @XmlElement(name = tagNamePhone)
    private String phone = "";

    public XmlUser() {
    }

    public XmlUser(String name, String phone) {
        this();
        this.name = name;
        this.phone = phone;
    }

    @Override
    public String getName() {
        return name;
    }
    @Override
    public String getPhone() {
        return phone;
    }
}
